/**
 * Notes: 部门实体
 * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat)
 * Date: 2024-03-10 19:20:00 
 */

const BaseProjectModel = require('../config/models_config').base_project_model;

class DepartmentModel extends BaseProjectModel {

}

// 集合名
DepartmentModel.CL = BaseProjectModel.C('oa_department');

DepartmentModel.DB_STRUCTURE = {
    _pid: 'string|true',
    DEPT_ID: 'string|true',
    
    DEPT_NAME: 'string|true|comment=部门名称',
    DEPT_PARENT_ID: 'string|false|comment=上级部门ID',
    DEPT_ORDER: 'int|true|default=0|comment=排序号',
    DEPT_LEADER_ID: 'string|false|comment=部门负责人ID',
    DEPT_STATUS: 'int|true|default=1|comment=状态：0=禁用, 1=正常',
    
    DEPT_ADD_TIME: 'int|true',
    DEPT_EDIT_TIME: 'int|true',
    DEPT_ADD_IP: 'string|false',
    DEPT_EDIT_IP: 'string|false',
};

// 字段前缀
DepartmentModel.FIELD_PREFIX = "DEPT_";

/**
 * 状态：0=禁用, 1=正常
 */
DepartmentModel.STATUS = {
    DISABLED: 0,
    NORMAL: 1
};

DepartmentModel.STATUS_DESC = {
    DISABLED: '禁用',
    NORMAL: '正常'
};

module.exports = DepartmentModel; 